<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>相邻兄弟选择器</title>
    <style>
        li {
            list-style: none;
        }

        #li-target {
            color: red;
        }

        #li-target+li {
            color: #00FF00;
        }

        #li-target+.li2 {
            color: #00FFCC;
        }
    </style>
</head>
<body>
    <h1>相邻兄弟选择器</h1>
    <p>E+F</p>
    <p>选择紧临目标的第一个元素</p>
    <ul class="ul">
        <li>1</li>
        <li>2</li>
        <li>3</li>
        <li id="li-target">我</li>
        <li>5</li>
        <li class="li2">class="li2" （即使使用#li-target+.li2我也不会被选上）</li>
        <li>7</li>
    </ul>
</body>
</html>